from Ling.common.utils.OcrUtils import winFile, trainAndTest, root_win, root_studio, \
    parse_text_render_labels_txt

# trainListFromAll(50000, 1000, 'train_data_zy20w', 'train_data_zy5w')
# trainListFromAll(50000, 2000, 'train_data_all18w', 'train_data_all5w')

# trainListFromAll(50000, 2000, 'Chinese_dataset', 'Chinese_dataset5w')

# spz2temp(['D:/ocr/ocr_resouces/train_data/train_data_spz/'], 'D:/ocr/ocr_resouces/train_data/train_data_temp/', 10000)
# recList([['train_data_spz', 'train_data_zy', 'train_data_all']], root_win, root_studio)
# jjList()
# winFile(['train_data_spz', 'train_data_zy', 'train_data_all', 'train_data_jj'])
# winFile(['train_data_temp'])

# randomFolder('train_data_all', 'train_data_all5w', 50000, 2000)
# winFile(['train_data_all5w'])
# recList(['train_data_spz20w', 'train_data_zy20w', 'train_data_all20w'], root_win, root_studio)
# trainAndTest(['train_data_spz20w', 'train_data_zy20w', 'train_data_all20w'])
# winFile(['train_data_spz20w', 'train_data_zy20w', 'train_data_all20w'])


# workList = ['train_data_spz5q', 'train_data_zy5q', 'train_data_all5q',
#             'train_data_spz2w', 'train_data_zy2w', 'train_data_all2w',
#             'train_data_spz20w', 'train_data_zy20w', 'train_data_all20w']
# recList(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# trainAndTest(['train_data_jj'])
# winFile(['train_data_jj'])


# workList = ['Chinese_dataset']
# # recListChinese(workList, root_win, root_studio)
# trainAndTest(workList, 50000)
# winFile(workList)


# workList = ['train_data_jj']
# trainAndTest(workList, None)
# winFile(workList)

#
# workList = ['train_data_all18w']
# recList(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# workList = ['train_data_customer']
# recListChinese(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# maxLenth = maxChar(['train_data_customer.txt'])
# print(maxLenth)

# workList = ['train_data_customer']
# recListChinese(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# workList = ['train_data_customer.txt']
# maxchar = maxChar(workList)
# print(maxchar)
#
# workList = ['train_data_cyz7w', 'train_data_zyspz3w', 'train_data_zywbspz20w']
# recList(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# workList = ['train_data_cyz7w', 'train_data_zyspz3w', 'train_data_zywbspz20w']
# recList(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# workList = ['train_data_zy650w_char_le_100', 'train_data_zy650w_char_101_200', 'train_data_zy650w_char_ge_200']
# workList = ['train_data_zy650w_char_101_200']
# parse_text_render_labels_txt(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# workList = ['customer_data']
# parse_text_render_labels_txt(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# workList = ['rand_font']
# parse_text_render_labels_txt(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

# workList = ['char_enum_by_font_no_dot_80']
# parse_text_render_labels_txt(workList, root_win, root_studio)
# trainAndTest(workList, None)
# winFile(workList)

workList = ['effect_rand_122_2_corp']
parse_text_render_labels_txt(workList, root_win, root_studio)
trainAndTest(workList, None)
winFile(workList)
